<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
<body>
<form class="layui-form" action="">
    <div class="mainBox">
        <div class="main-container">
            
			<div class="layui-form-item">
				<label class="layui-form-label">片段位置</label>
				<div class="layui-input-block">
				  <select name="pid"  lay-verify="required">
					<option value=""></option>
					{volist name="type" id="v"}
					{if !$action_up}
					<option value="{$v.id}">{$v.name} - {$v.mark}</option>
					{elseif $v.id == $model.pid}
					<option value="{$v.id}" selected="selected">{$v.name} - {$v.mark}</option>
					{else/}
					<option value="{$v.id}">{$v.name} - {$v.mark}</option>
					{/if}
					{/volist}
				  </select>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">标记</label>
				<div class="layui-input-block">
				  <input type="text" name="mark" value="{$model.mark??''}" placeholder="请输入标记" class="layui-input"  verify="must">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">名称</label>
				<div class="layui-input-block">
				  <input type="text" name="name" value="{$model.name??''}" placeholder="请输入名称" class="layui-input"  verify="must">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">标题</label>
				<div class="layui-input-block">
				  <input type="text" name="title" value="{$model.title??''}" placeholder="请输入标题" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">副标题</label>
				<div class="layui-input-block">
				  <input type="text" name="subhead" value="{$model.subhead??''}" placeholder="请输入副标题" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">简介</label>
				<div class="layui-input-block">
				  <textarea name="intro" placeholder="请输入简介" class="layui-textarea" >{$model.intro??''}</textarea>
				</div>
			</div>

			<div class="layui-form-item layui-img-upload">
				<label class="layui-form-label">附加图片</label>
				<div class="layui-input-block">
					{:opt_photo("img")}
					<button class="pear-btn pear-btn-primary pear-btn-sm upload-image" type="button">
						<i class="icon pear-icon pear-icon-picture">
						</i>
						上传图片
					</button>
					<input name="img" type="hidden" class="layui-input" value="{$model.img??''}">
					<div class="upload-image">
						<span>
						</span>
						<img class="upload-image" src="{$model.img??''}">
					</div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">附加链接</label>
				<div class="layui-input-block">
				  <input type="text" name="url" value="{$model.url??''}" placeholder="请输入附加链接" class="layui-input" >
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">排序</label>
				<div class="layui-input-block">
				  <input type="text" name="sort" value="{$model.sort??100}" placeholder="请输入排序" class="layui-input"  verify="must">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">内容</label>
				<div class="layui-input-block">
				  <textarea id="content" name="content" placeholder="请输入内容" class="layui-textarea" >{$model.content??''}</textarea>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block">
					<input type="checkbox" lay-skin="switch" value="status" lay-text="启用|禁用" {if $model.status??1 == 1} checked {/if}><input type="hidden" name="status" value="{$model.status??1}">
				</div>
			</div>

        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save" verify="submit">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
	layui.use(['form', 'jquery', 'uploads','common','mycomm'], function () {
		let form = layui.form;
		let $ = layui.jquery;
		let common = layui.common;
		let mycomm = layui.mycomm;
	
		mycomm.editSubmit();
		
		
	})
</script>
{$LOAD_STYLE.bottom|raw}
{:ueditor_init()}
{:ueditor('content','100%',400)}

</body>
</html>